Separate SwiftKit into SwiftKitCore and SwiftKitFFM#300
Separate SwiftKit into SwiftKitCore and SwiftKitFFM#300ktoso merged 9 commits intoswiftlang:mainfrom
Conversation
I think that's the right call, but let's avoid getting the method via reflection and instead just give the cleanup something to run, rather that reflection trick and it'll be fine 👍 |
| - name: Gradle :SwiftKitFFM:build | ||
| run: ./gradlew :SwiftKitFFM:build -x test | ||
| - name: Gradle :SwiftKitFFM:check | ||
| run: ./gradlew :SwiftKitFFM:check --info |
There was a problem hiding this comment.
yeah that's nice actually to keep them separate rather than one big :check
| # The classpath MUST end with a * if it contains jar files, and must not if it directly contains class files. | ||
| SWIFTKIT_CLASSPATH="$(pwd)/../../SwiftKit/build/libs/*" | ||
| SWIFTKIT_CORE_CLASSPATH="$(pwd)/../../SwiftKitCore/build/libs/*" | ||
| SWIFTKIT_FFM_CLASSPATH="$(pwd)/../../SwiftKitFFM/build/libs/*" |
There was a problem hiding this comment.
Yup, sorry you had to go through figuring that out, but now you know hah :)
| dependencies { | ||
| implementation(project(':SwiftKit')) | ||
| implementation(project(':SwiftKitCore')) | ||
| implementation(project(':SwiftKitFFM')) |
There was a problem hiding this comment.
Nitpick, no need to fix up right now -- since FFM depends on Core we could just list the FFM dependency here, it'd resolve properly I think even with project dependencies
|
|
||
| @Override | ||
| public void run() { | ||
| markAsDestroyed.run(); |
There was a problem hiding this comment.
We can do this in a follow up but we should only run the destroy if the mark permits us to do so; we can fix that later though
ktoso
left a comment
There was a problem hiding this comment.
Looking good, let's get that in :)
The goal of this PR is to separate SwiftKit into two modules:
SwiftKitCore: A module that supports non-FFM memory management and uses JNI for any downcalls.SwiftKitFFM: A module that uses FFM for allocation of memory and downcalls.